#ifndef _FIGURE_FACTORY_H_
#define _FIGURE_FACTORY_H_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <map>
#include<string>
#include "..\Factory\ColorFactory.h"
#include "..\Figure\Figure.h"
#include "..\Figure\Square.h"
#include "..\Figure\Circle.h"
#include "..\Figure\Rectangle.h"
#include "..\Figure\Segment.h"
#include "..\Parser\MapList.h"
#include "..\Exceptions\InvalidObjectTypeException.h"
#include "..\Exceptions\InvalidFigureException.h"
#include "..\Exceptions\InvalidIntegerException.h"
#include "..\enum\ObjectTypeUtils.h"
#include "..\enum\ObjectType.h"
#include "..\Validator\ValidatorUtils.h"
#include "..\Container\TextureContainer.h"
#include "..\Container\FigureContainer.h"
#include "..\Container\DefaultParameterContainer.h"


using namespace std;

class FigureFactory{

	public:

		static FigureFactory* getInstance();

		Figure* getFigure(ObjectType &type, MapList* parameters) throw (InvalidObjectTypeException);
	
		virtual ~FigureFactory();

		static void destroy();

	private:
		
		static FigureFactory* instance;

		Figure* createSquare(MapList* parameters) throw (InvalidFigureException);

		Figure* createSegment(MapList* parameters) throw (InvalidFigureException);
		
		Figure* createRectangle(MapList* parameters) throw (InvalidFigureException);
		
		Figure* createCircle(MapList* parameters) throw (InvalidFigureException);

		FigureFactory();
};

#endif
